﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace ESOL.Common.Entity
{
    //客户
    [DataContract]
    public class CustomerQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string customerNo { set; get; }
        [DataMember]
        public string customerName { set; get; }
        [DataMember]
        public string status { set; get; }
    }

    [DataContract]
    public class CustomerPageResult
    {
        [DataMember]
        public int TotalCount { set; get; }
        [DataMember]
        public List<MstCustomerEntity> results { set; get; }
    }

    [DataContract]
    public class CustomerSaveParam
    {
        [DataMember]
        public string userNo { set; get; }
        [DataMember]
        public MstCustomerEntity customer { set; get; }
        [DataMember]
        public List<MstCustomerSalesmanEntity> salesmans { set; get; }
        [DataMember]
        public List<MstCustomerContactEntity> contacts { set; get; }
    }

    [DataContract]
    public class CodeRuleQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public string type { set; get; }
        [DataMember]
        public string name { set; get; }
        [DataMember]
        public string prefix { set; get; }
    }

    [DataContract]
    public class CodeRuleSaveParam
    {
        [DataMember]
        public List<MstCodeRuleEntity> adds { set; get; }
        [DataMember]
        public List<MstCodeRuleEntity> updates { set; get; }
        [DataMember]
        public List<MstCodeRuleEntity> dels { set; get; }

    }

    [DataContract]
    public class CommonItemQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public string code { set; get; }
        [DataMember]
        public string name { set; get; }
        [DataMember]
        public string type { set; get; }
        [DataMember]
        public string value { set; get; }
        [DataMember]
        public string delFlag { set; get; }

    }

    //省、市
    [DataContract]
    public class AreaQueryCondition
    {
        [DataMember]
        public string AreaName { set; get; }
        [DataMember]
        public string AreaType { set; get; }
        [DataMember]
        public string ParentAreaId { set; get; }
    }

    //客户联系人
    [DataContract]
    public class CustomerContactQueryCondition
    {
        [DataMember]
        public string CustomerId { set; get; }
        [DataMember]
        public string CustomerName { set; get; }
        [DataMember]
        public string ContactName { set; get; }
        [DataMember]
        public int IsActive { set; get; }
    }

    //产品类型
    [DataContract]
    public class MaterialTypeQueryCondition
    {
        [DataMember]
        public string ParentTypeId { set; get; }
        [DataMember]
        public string ParentTypeName { set; get; }
        [DataMember]
        public string ParentTypeCode { set; get; }
        [DataMember]
        public string TypeCode { set; get; }
        [DataMember]
        public string TypeName { set; get; }
        [DataMember]
        public string Category { set; get; }

    }

    [DataContract]
    public class MaterialTypeResult
    {
        [DataMember]
        public string ProductTypeId { set; get; }
        [DataMember]
        public string ParentTypeId { set; get; }
        [DataMember]
        public string ProductTypeCode { set; get; }
        [DataMember]
        public string ProductTypeName { set; get; }
        [DataMember]
        public string Category { set; get; }
        [DataMember]
        public string Description { set; get; }

        [DataMember]
        public int SelectedFlag { set; get; }
    }

    [DataContract]
    public class ProductQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }
        [DataMember]
        public string masterClassName { set; get; }
        [DataMember]
        public string masterClassCode { set; get; }

        [DataMember]
        public string middleClassName { set; get; }
        [DataMember]
        public string middleClassCode { set; get; }

        [DataMember]
        public string typeName { set; get; }
        [DataMember]
        public string typeCode { set; get; }
        [DataMember]
        public string stdName { set; get; }
        [DataMember]
        public string stdCode { set; get; }
        [DataMember]
        public string materialName { set; get; }
        [DataMember]
        public string materialCode { set; get; }
        [DataMember]
        public string productName { set; get; }
        [DataMember]
        public string productCode { set; get; }
        [DataMember]
        public string description { set; get; }
        [DataMember]
        public string specIn { set; get; }
        [DataMember]
        public int storeType { set; get; }

    }

    //物料及类型信息
    [DataContract]
    public class MaterialInfo
    {
        [DataMember]
        public string ProductId
        {
            get;
            set;
        }

        [DataMember]
        public string ProductTypeId
        {
            get;
            set;
        }

        [DataMember]
        public string ProductCode
        {
            get;
            set;
        }

        [DataMember]
        public string ProductSpecIn
        {
            get;
            set;
        }

        [DataMember]
        public string ProductSpecOut
        {
            get;
            set;
        }

        [DataMember]
        public string ProductName
        {
            get;
            set;
        }

        [DataMember]
        public decimal SuggestPrice
        {
            get;
            set;
        }

        [DataMember]
        public string Material
        {
            get;
            set;
        }

        [DataMember]
        public decimal Weight
        {
            get;
            set;
        }

        [DataMember]
        public decimal Size
        {
            get;
            set;
        }

        [DataMember]
        public decimal DiameterOut
        {
            get;
            set;
        }

        [DataMember]
        public decimal DiameterIn
        {
            get;
            set;
        }

        [DataMember]
        public decimal Length
        {
            get;
            set;
        }

        [DataMember]
        public string Unit
        {
            get;
            set;
        }

        [DataMember]
        public string MinorUnit
        {
            get;
            set;
        }

        [DataMember]
        public string MaterialCode
        {
            get;
            set;
        }

        [DataMember]
        public string TypeName
        {
            get;
            set;
        }

        [DataMember]
        public string TypeCode
        {
            get;
            set;
        }

        [DataMember]
        public string StdName
        {
            get;
            set;
        }

        [DataMember]
        public string StdCode
        {
            get;
            set;
        }

        [DataMember]
        public string RootCodeType
        {
            get;
            set;
        }

        [DataMember]
        public int StockType
        {
            get;
            set;
        }

        [DataMember]
        public decimal Volume
        {
            get;
            set;
        }

        [DataMember]
        public string Uv
        {
            get;
            set;
        }

        [DataMember]
        public decimal Arer
        {
            get;
            set;
        }

        [DataMember]
        public string Ua
        {
            get;
            set;
        }

        [DataMember]
        public string BlueprintPath
        {
            get;
            set;
        }

        [DataMember]
        public byte[] Photo { set; get; }

        [DataMember]
        public string Description
        {
            get;
            set;
        }

        [DataMember]
        public int DeleteFlag
        {
            get;
            set;
        }

        [DataMember]
        public string MainTypeName { set; get; }

        [DataMember]
        public string MainTypeCode { set; get; }

        [DataMember]
        public string MidTypeName { set; get; }

        [DataMember]
        public string MidTypeCode { set; get; }


    }

    [DataContract]
    public class MaterialInfoPageResult
    {
        [DataMember]
        public string UserNo { set; get; }
        [DataMember]
        public int TotalCount { set; get; }
        [DataMember]
        public List<MaterialInfo> results { set; get; }
    }

    //供应商产品范围
    [DataContract]
    public class SupplierProductScopeDto
    {
        [DataMember]
        public string ItemCode { set; get; }
        [DataMember]
        public string ItemName { set; get; }
        [DataMember]
        public string ItemType { set; get; }
        [DataMember]
        public string ItemValue { set; get; }
        [DataMember]
        public int IsDeleted { set; get; }
        [DataMember]
        public string Remark { set; get; }
        [DataMember]
        public int SelectedFlag { set; get; }

    }

    //供应商保存参数
    [DataContract]
    public class SupplierSaveParam
    {
        [DataMember]
        public string curUserNo { set; get; }
        [DataMember]
        public MstSupplierEntity supp { set; get; }
        [DataMember]
        public List<MstSupplierContactEntity> AddContacts { set; get; }
        [DataMember]
        public List<MstSupplierContactEntity> UpdatedContacts { set; get; }
        [DataMember]
        public List<MstSupplierContactEntity> DelContacts { set; get; }
        [DataMember]
        public List<MstSupplierScopeEntity> AddScopes { set; get; }
        [DataMember]
        public List<MstSupplierScopeEntity> UpdatedScopes { set; get; }
        [DataMember]
        public List<MstSupplierScopeEntity> DelScopes { set; get; }
    }

    //物料历史价格
    [DataContract]
    public class MaterialPriceDto
    {
        [DataMember]
        public string Id { set; get; }
        [DataMember]
        public string CreatedBy { set; get; }
        [DataMember]
        public DateTime CreatedDate { set; get; }
        [DataMember]
        public string UpdatedBy { set; get; }
        [DataMember]
        public DateTime UpdatedDate { set; get; }
        [DataMember]
        public int IsActive { set; get; }
        [DataMember]
        public string SupplierId { set; get; }
        [DataMember]
        public decimal CurrentPrice { set; get; }
        [DataMember]
        public string PriceUnit { set; get; }
        [DataMember]
        public string Remark { set; get; }

        [DataMember]
        public string CreatedUser { set; get; }
        [DataMember]
        public string UpdatedUser { set; get; }
        [DataMember]
        public string SupplierName { set; get; }
    }

    //物料保存参数
    [DataContract]
    public class MaterialSaveParam
    {
        [DataMember]
        public string UserNo { set; get; }
        [DataMember]
        public MaterialInfo MaterialDto { set; get; }
        [DataMember]
        public List<MaterialPriceDto> addsPriceDto { set; get; }
        [DataMember]
        public List<MaterialPriceDto> updatesPriceDto { set; get; }
        [DataMember]
        public List<MaterialPriceDto> delsPriceDto { set; get; }
    }

    //工作日历查询参数
    [DataContract]
    public class MstScheduleQueryCondition
    {
        [DataMember]
        public string UserNo { set; get; }
        [DataMember]
        public DateTime StartDate { set; get; }
        [DataMember]
        public DateTime EndDate { set; get; }
        [DataMember]
        public int Type { set; get; }

    }

    //工作日历保存参数
    [DataContract]
    public class MstScheduleSaveParam
    {
        [DataMember]
        public string userNo { set; get; }
        [DataMember]
        public List<MstScheduleEntity> adds { set; get; }
        [DataMember]
        public List<MstScheduleEntity> updates { set; get; }
        [DataMember]
        public List<MstScheduleEntity> dels { set; get; }
    }

    [DataContract]
    public class MstMaterialExDto
    {
        [DataMember]
        public string MaterialId { set; get; }
        [DataMember]
        public string MaterialCode { set; get; }
        [DataMember]
        public string Source { set; get; }
        [DataMember]
        public decimal LotSize { set; get; }
        [DataMember]
        public decimal OrderMin { set; get; }
        [DataMember]
        public decimal OrderMul { set; get; }
        [DataMember]
        public int LeadTime { set; get; }
        [DataMember]
        public int VleadTime { set; get; }
        [DataMember]
        public decimal SafeStock { set; get; }
        [DataMember]
        public int MpsFlag { set; get; }
        [DataMember]
        public int PhFlag { set; get; }

        [DataMember]
        public string MaterialName { set; get; }
        [DataMember]
        public string TypeName { set; get; }
        [DataMember]
        public string StdName { set; get; }
        [DataMember]
        public string Material { set; get; }
        [DataMember]
        public string Unit { set; get; }
        [DataMember]
        public string MinorUnit { set; get; }
        [DataMember]
        public decimal SuggestPrice { set; get; }

    }

    [DataContract]
    public class MstMaterialExPageResult
    {
        [DataMember]
        public int TotalCount { set; get; }
        [DataMember]
        public List<MstMaterialExDto> materialEx { set; get; }
    }

    [DataContract]
    public class MaterialExQueryCondition
    {
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }

        [DataMember]
        public string typeName { set; get; }
        [DataMember]
        public string typeCode { set; get; }
        [DataMember]
        public string stdName { set; get; }
        [DataMember]
        public string stdCode { set; get; }
        [DataMember]
        public string materialName { set; get; }
        [DataMember]
        public string materialCode { set; get; }
        [DataMember]
        public string material { set; get; }

        [DataMember]
        public int storeType { set; get; }

        [DataMember]
        public int source { set; get; }
        [DataMember]
        public int minLeadTime { set; get; }
        [DataMember]
        public int maxLeadTime { set; get; }

    }


    //客户业务清单
    [DataContract]
    public class MstSignDtoQueryCondition
    {
        [DataMember]
        public string curUserId { set; get; }
        [DataMember]
        public int txtPageIndex { set; get; }
        [DataMember]
        public int txtPageSize { set; get; }

    }

    [DataContract]
    public class MstSignDto : MstSignEntity
    {
        [DataMember]
        public string CreatedUser { set; get; }
        [DataMember]
        public string UpdatedUser { set; get; }
        [DataMember]
        public string UserName { set; get; }
    }

    [DataContract]
    public class MstSignDtoPageResult
    {
        [DataMember]
        public int TotalCount { set; get; }
        [DataMember]
        public List<MstSignDto> result { set; get; }
    }

}
